Integrand size = 39, antiderivative size = 148 \[ \int \frac {\cos (c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+a \cos (c+d x))^4} \, dx=\frac {(23 A-2 B-54 C) \sin (c+d x)}{105 a^4 d (1+\cos (c+d x))^2}+\frac {(8 A+13 B+36 C) \sin (c+d x)}{105 a^4 d (1+\cos (c+d x))}-\frac {(A-B+C) \cos ^2(c+d x) \sin (c+d x)}{7 d (a+a \cos (c+d x))^4}-\frac {(6 A+B-8 C) \sin (c+d x)}{35 a d (a+a \cos (c+d x))^3} \]
1/105*(23*A-2*B-54*C)*sin(d*x+c)/a^4/d/(1+cos(d*x+c))^2+1/105*(8*A+13*B+36 *C)*sin(d*x+c)/a^4/d/(1+cos(d*x+c))-1/7*(A-B+C)*cos(d*x+c)^2*sin(d*x+c)/d/ (a+a*cos(d*x+c))^4-1/35*(6*A+B-8*C)*sin(d*x+c)/a/d/(a+a*cos(d*x+c))^3
Time = 2.96 (sec) , antiderivative size = 239, normalized size of antiderivative = 1.61 \[ \int \frac {\cos (c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+a \cos (c+d x))^4} \, dx=\frac {\cos \left (\frac {1}{2} (c+d x)\right ) \sec \left (\frac {c}{2}\right ) \left (70 (2 A+4 B+9 C) \sin \left (\frac {d x}{2}\right )-35 (4 A+5 B+18 C) \sin \left (c+\frac {d x}{2}\right )+168 A \sin \left (c+\frac {3 d x}{2}\right )+168 B \sin \left (c+\frac {3 d x}{2}\right )+441 C \sin \left (c+\frac {3 d x}{2}\right )-105 B \sin \left (2 c+\frac {3 d x}{2}\right )-315 C \sin \left (2 c+\frac {3 d x}{2}\right )+56 A \sin \left (2 c+\frac {5 d x}{2}\right )+91 B \sin \left (2 c+\frac {5 d x}{2}\right )+147 C \sin \left (2 c+\frac {5 d x}{2}\right )-105 C \sin \left (3 c+\frac {5 d x}{2}\right )+8 A \sin \left (3 c+\frac {7 d x}{2}\right )+13 B \sin \left (3 c+\frac {7 d x}{2}\right )+36 C \sin \left (3 c+\frac {7 d x}{2}\right )\right )}{420 a^4 d (1+\cos (c+d x))^4} \]
(Cos[(c + d*x)/2]*Sec[c/2]*(70*(2*A + 4*B + 9*C)*Sin[(d*x)/2] - 35*(4*A + 5*B + 18*C)*Sin[c + (d*x)/2] + 168*A*Sin[c + (3*d*x)/2] + 168*B*Sin[c + (3 *d*x)/2] + 441*C*Sin[c + (3*d*x)/2] - 105*B*Sin[2*c + (3*d*x)/2] - 315*C*S in[2*c + (3*d*x)/2] + 56*A*Sin[2*c + (5*d*x)/2] + 91*B*Sin[2*c + (5*d*x)/2 ] + 147*C*Sin[2*c + (5*d*x)/2] - 105*C*Sin[3*c + (5*d*x)/2] + 8*A*Sin[3*c + (7*d*x)/2] + 13*B*Sin[3*c + (7*d*x)/2] + 36*C*Sin[3*c + (7*d*x)/2]))/(42 0*a^4*d*(1 + Cos[c + d*x])^4)
Time = 0.92 (sec) , antiderivative size = 159, normalized size of antiderivative = 1.07, number of steps used = 11, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.282, Rules used = {3042, 3520, 3042, 3447, 3042, 3498, 25, 3042, 3229, 3042, 3127}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\cos (c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a \cos (c+d x)+a)^4} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sin \left (c+d x+\frac {\pi }{2}\right ) \left (A+B \sin \left (c+d x+\frac {\pi }{2}\right )+C \sin \left (c+d x+\frac {\pi }{2}\right )^2\right )}{\left (a \sin \left (c+d x+\frac {\pi }{2}\right )+a\right )^4}dx\) |
\(\Big \downarrow \) 3520 |
\(\displaystyle \frac {\int \frac {\cos (c+d x) (a (5 A+2 B-2 C)-a (A-B-6 C) \cos (c+d x))}{(\cos (c+d x) a+a)^3}dx}{7 a^2}-\frac {(A-B+C) \sin (c+d x) \cos ^2(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {\sin \left (c+d x+\frac {\pi }{2}\right ) \left (a (5 A+2 B-2 C)-a (A-B-6 C) \sin \left (c+d x+\frac {\pi }{2}\right )\right )}{\left (\sin \left (c+d x+\frac {\pi }{2}\right ) a+a\right )^3}dx}{7 a^2}-\frac {(A-B+C) \sin (c+d x) \cos ^2(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3447 |
\(\displaystyle \frac {\int \frac {a (5 A+2 B-2 C) \cos (c+d x)-a (A-B-6 C) \cos ^2(c+d x)}{(\cos (c+d x) a+a)^3}dx}{7 a^2}-\frac {(A-B+C) \sin (c+d x) \cos ^2(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {a (5 A+2 B-2 C) \sin \left (c+d x+\frac {\pi }{2}\right )-a (A-B-6 C) \sin \left (c+d x+\frac {\pi }{2}\right )^2}{\left (\sin \left (c+d x+\frac {\pi }{2}\right ) a+a\right )^3}dx}{7 a^2}-\frac {(A-B+C) \sin (c+d x) \cos ^2(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3498 |
\(\displaystyle \frac {-\frac {\int -\frac {3 a^2 (6 A+B-8 C)-5 a^2 (A-B-6 C) \cos (c+d x)}{(\cos (c+d x) a+a)^2}dx}{5 a^2}-\frac {a (6 A+B-8 C) \sin (c+d x)}{5 d (a \cos (c+d x)+a)^3}}{7 a^2}-\frac {(A-B+C) \sin (c+d x) \cos ^2(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\frac {\int \frac {3 a^2 (6 A+B-8 C)-5 a^2 (A-B-6 C) \cos (c+d x)}{(\cos (c+d x) a+a)^2}dx}{5 a^2}-\frac {a (6 A+B-8 C) \sin (c+d x)}{5 d (a \cos (c+d x)+a)^3}}{7 a^2}-\frac {(A-B+C) \sin (c+d x) \cos ^2(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\int \frac {3 a^2 (6 A+B-8 C)-5 a^2 (A-B-6 C) \sin \left (c+d x+\frac {\pi }{2}\right )}{\left (\sin \left (c+d x+\frac {\pi }{2}\right ) a+a\right )^2}dx}{5 a^2}-\frac {a (6 A+B-8 C) \sin (c+d x)}{5 d (a \cos (c+d x)+a)^3}}{7 a^2}-\frac {(A-B+C) \sin (c+d x) \cos ^2(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3229 |
\(\displaystyle \frac {\frac {\frac {1}{3} a (8 A+13 B+36 C) \int \frac {1}{\cos (c+d x) a+a}dx+\frac {(23 A-2 B-54 C) \sin (c+d x)}{3 d (\cos (c+d x)+1)^2}}{5 a^2}-\frac {a (6 A+B-8 C) \sin (c+d x)}{5 d (a \cos (c+d x)+a)^3}}{7 a^2}-\frac {(A-B+C) \sin (c+d x) \cos ^2(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\frac {1}{3} a (8 A+13 B+36 C) \int \frac {1}{\sin \left (c+d x+\frac {\pi }{2}\right ) a+a}dx+\frac {(23 A-2 B-54 C) \sin (c+d x)}{3 d (\cos (c+d x)+1)^2}}{5 a^2}-\frac {a (6 A+B-8 C) \sin (c+d x)}{5 d (a \cos (c+d x)+a)^3}}{7 a^2}-\frac {(A-B+C) \sin (c+d x) \cos ^2(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3127 |
\(\displaystyle \frac {\frac {\frac {a (8 A+13 B+36 C) \sin (c+d x)}{3 d (a \cos (c+d x)+a)}+\frac {(23 A-2 B-54 C) \sin (c+d x)}{3 d (\cos (c+d x)+1)^2}}{5 a^2}-\frac {a (6 A+B-8 C) \sin (c+d x)}{5 d (a \cos (c+d x)+a)^3}}{7 a^2}-\frac {(A-B+C) \sin (c+d x) \cos ^2(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
-1/7*((A - B + C)*Cos[c + d*x]^2*Sin[c + d*x])/(d*(a + a*Cos[c + d*x])^4) + (-1/5*(a*(6*A + B - 8*C)*Sin[c + d*x])/(d*(a + a*Cos[c + d*x])^3) + (((2 3*A - 2*B - 54*C)*Sin[c + d*x])/(3*d*(1 + Cos[c + d*x])^2) + (a*(8*A + 13* B + 36*C)*Sin[c + d*x])/(3*d*(a + a*Cos[c + d*x])))/(5*a^2))/(7*a^2)
3.4.67.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> Simp[-Cos[c + d*x]/(d*(b + a*Sin[c + d*x])), x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b ^2, 0]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b*c - a*d)*Cos[e + f*x]*((a + b*Sin[e + f* x])^m/(a*f*(2*m + 1))), x] + Simp[(a*d*m + b*c*(m + 1))/(a*b*(2*m + 1)) I nt[(a + b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && LtQ[m, -2^(-1)]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Int[(a + b*Sin[e + f*x])^m*(A*c + (B*c + A*d)*Sin[e + f*x] + B*d*Sin[e + f*x]^2), x] /; FreeQ[{a, b, c, d, e, f, A, B, m}, x] && NeQ[b*c - a*d, 0]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(A*b - a* B + b*C)*Cos[e + f*x]*((a + b*Sin[e + f*x])^m/(a*f*(2*m + 1))), x] + Simp[1 /(a^2*(2*m + 1)) Int[(a + b*Sin[e + f*x])^(m + 1)*Simp[a*A*(m + 1) + m*(b *B - a*C) + b*C*(2*m + 1)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B, C}, x] && LtQ[m, -1] && EqQ[a^2 - b^2, 0]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(a*A - b*B + a*C)*Cos[e + f*x]*(a + b* Sin[e + f*x])^m*((c + d*Sin[e + f*x])^(n + 1)/(f*(b*c - a*d)*(2*m + 1))), x ] + Simp[1/(b*(b*c - a*d)*(2*m + 1)) Int[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^n*Simp[A*(a*c*(m + 1) - b*d*(2*m + n + 2)) + B*(b*c*m + a *d*(n + 1)) - C*(a*c*m + b*d*(n + 1)) + (d*(a*A - b*B)*(m + n + 2) + C*(b*c *(2*m + 1) - a*d*(m - n - 1)))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c ^2 - d^2, 0] && LtQ[m, -2^(-1)]
Time = 2.00 (sec) , antiderivative size = 86, normalized size of antiderivative = 0.58
method | result | size |
parallelrisch | \(-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\left (A -B +C \right ) \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {7 \left (A +B -3 C \right ) \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{5}+7 \left (-\frac {A}{3}+\frac {B}{3}+C \right ) \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-7 A -7 B -7 C \right )}{56 a^{4} d}\) | \(86\) |
derivativedivides | \(\frac {\frac {\left (-A +B -C \right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{7}+\frac {\left (3 C -A -B \right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{5}+\frac {\left (A -B -3 C \right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3}+A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+B \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) C}{8 d \,a^{4}}\) | \(108\) |
default | \(\frac {\frac {\left (-A +B -C \right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{7}+\frac {\left (3 C -A -B \right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{5}+\frac {\left (A -B -3 C \right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3}+A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+B \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) C}{8 d \,a^{4}}\) | \(108\) |
norman | \(\frac {-\frac {\left (A -B +C \right ) \left (\tan ^{13}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{56 a d}+\frac {\left (A +B +C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{8 a d}+\frac {\left (5 A +4 B +3 C \right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{12 a d}+\frac {\left (11 A -4 B -3 C \right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{70 a d}-\frac {\left (11 A -4 B -3 C \right ) \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{140 a d}+\frac {\left (19 A +9 B +3 C \right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{40 a d}-\frac {\left (73 A +53 B -39 C \right ) \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{840 a d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3} a^{3}}\) | \(212\) |
risch | \(\frac {2 i \left (105 C \,{\mathrm e}^{6 i \left (d x +c \right )}+105 B \,{\mathrm e}^{5 i \left (d x +c \right )}+315 C \,{\mathrm e}^{5 i \left (d x +c \right )}+140 A \,{\mathrm e}^{4 i \left (d x +c \right )}+175 B \,{\mathrm e}^{4 i \left (d x +c \right )}+630 C \,{\mathrm e}^{4 i \left (d x +c \right )}+140 A \,{\mathrm e}^{3 i \left (d x +c \right )}+280 B \,{\mathrm e}^{3 i \left (d x +c \right )}+630 C \,{\mathrm e}^{3 i \left (d x +c \right )}+168 A \,{\mathrm e}^{2 i \left (d x +c \right )}+168 B \,{\mathrm e}^{2 i \left (d x +c \right )}+441 C \,{\mathrm e}^{2 i \left (d x +c \right )}+56 A \,{\mathrm e}^{i \left (d x +c \right )}+91 B \,{\mathrm e}^{i \left (d x +c \right )}+147 C \,{\mathrm e}^{i \left (d x +c \right )}+8 A +13 B +36 C \right )}{105 d \,a^{4} \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )^{7}}\) | \(213\) |
-1/56*tan(1/2*d*x+1/2*c)*((A-B+C)*tan(1/2*d*x+1/2*c)^6+7/5*(A+B-3*C)*tan(1 /2*d*x+1/2*c)^4+7*(-1/3*A+1/3*B+C)*tan(1/2*d*x+1/2*c)^2-7*A-7*B-7*C)/a^4/d
Time = 0.27 (sec) , antiderivative size = 135, normalized size of antiderivative = 0.91 \[ \int \frac {\cos (c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+a \cos (c+d x))^4} \, dx=\frac {{\left ({\left (8 \, A + 13 \, B + 36 \, C\right )} \cos \left (d x + c\right )^{3} + {\left (32 \, A + 52 \, B + 39 \, C\right )} \cos \left (d x + c\right )^{2} + 4 \, {\left (13 \, A + 8 \, B + 6 \, C\right )} \cos \left (d x + c\right ) + 13 \, A + 8 \, B + 6 \, C\right )} \sin \left (d x + c\right )}{105 \, {\left (a^{4} d \cos \left (d x + c\right )^{4} + 4 \, a^{4} d \cos \left (d x + c\right )^{3} + 6 \, a^{4} d \cos \left (d x + c\right )^{2} + 4 \, a^{4} d \cos \left (d x + c\right ) + a^{4} d\right )}} \]
integrate(cos(d*x+c)*(A+B*cos(d*x+c)+C*cos(d*x+c)^2)/(a+a*cos(d*x+c))^4,x, algorithm="fricas")
1/105*((8*A + 13*B + 36*C)*cos(d*x + c)^3 + (32*A + 52*B + 39*C)*cos(d*x + c)^2 + 4*(13*A + 8*B + 6*C)*cos(d*x + c) + 13*A + 8*B + 6*C)*sin(d*x + c) /(a^4*d*cos(d*x + c)^4 + 4*a^4*d*cos(d*x + c)^3 + 6*a^4*d*cos(d*x + c)^2 + 4*a^4*d*cos(d*x + c) + a^4*d)
Time = 2.92 (sec) , antiderivative size = 267, normalized size of antiderivative = 1.80 \[ \int \frac {\cos (c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+a \cos (c+d x))^4} \, dx=\begin {cases} - \frac {A \tan ^{7}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{56 a^{4} d} - \frac {A \tan ^{5}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{40 a^{4} d} + \frac {A \tan ^{3}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{24 a^{4} d} + \frac {A \tan {\left (\frac {c}{2} + \frac {d x}{2} \right )}}{8 a^{4} d} + \frac {B \tan ^{7}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{56 a^{4} d} - \frac {B \tan ^{5}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{40 a^{4} d} - \frac {B \tan ^{3}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{24 a^{4} d} + \frac {B \tan {\left (\frac {c}{2} + \frac {d x}{2} \right )}}{8 a^{4} d} - \frac {C \tan ^{7}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{56 a^{4} d} + \frac {3 C \tan ^{5}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{40 a^{4} d} - \frac {C \tan ^{3}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{8 a^{4} d} + \frac {C \tan {\left (\frac {c}{2} + \frac {d x}{2} \right )}}{8 a^{4} d} & \text {for}\: d \neq 0 \\\frac {x \left (A + B \cos {\left (c \right )} + C \cos ^{2}{\left (c \right )}\right ) \cos {\left (c \right )}}{\left (a \cos {\left (c \right )} + a\right )^{4}} & \text {otherwise} \end {cases} \]
Piecewise((-A*tan(c/2 + d*x/2)**7/(56*a**4*d) - A*tan(c/2 + d*x/2)**5/(40* a**4*d) + A*tan(c/2 + d*x/2)**3/(24*a**4*d) + A*tan(c/2 + d*x/2)/(8*a**4*d ) + B*tan(c/2 + d*x/2)**7/(56*a**4*d) - B*tan(c/2 + d*x/2)**5/(40*a**4*d) - B*tan(c/2 + d*x/2)**3/(24*a**4*d) + B*tan(c/2 + d*x/2)/(8*a**4*d) - C*ta n(c/2 + d*x/2)**7/(56*a**4*d) + 3*C*tan(c/2 + d*x/2)**5/(40*a**4*d) - C*ta n(c/2 + d*x/2)**3/(8*a**4*d) + C*tan(c/2 + d*x/2)/(8*a**4*d), Ne(d, 0)), ( x*(A + B*cos(c) + C*cos(c)**2)*cos(c)/(a*cos(c) + a)**4, True))
Time = 0.22 (sec) , antiderivative size = 259, normalized size of antiderivative = 1.75 \[ \int \frac {\cos (c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+a \cos (c+d x))^4} \, dx=\frac {\frac {A {\left (\frac {105 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {35 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} - \frac {21 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} - \frac {15 \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}}\right )}}{a^{4}} + \frac {B {\left (\frac {105 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {35 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} - \frac {21 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} + \frac {15 \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}}\right )}}{a^{4}} + \frac {3 \, C {\left (\frac {35 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {35 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {21 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} - \frac {5 \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}}\right )}}{a^{4}}}{840 \, d} \]
integrate(cos(d*x+c)*(A+B*cos(d*x+c)+C*cos(d*x+c)^2)/(a+a*cos(d*x+c))^4,x, algorithm="maxima")
1/840*(A*(105*sin(d*x + c)/(cos(d*x + c) + 1) + 35*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 - 21*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 - 15*sin(d*x + c)^7/ (cos(d*x + c) + 1)^7)/a^4 + B*(105*sin(d*x + c)/(cos(d*x + c) + 1) - 35*si n(d*x + c)^3/(cos(d*x + c) + 1)^3 - 21*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 + 15*sin(d*x + c)^7/(cos(d*x + c) + 1)^7)/a^4 + 3*C*(35*sin(d*x + c)/(cos (d*x + c) + 1) - 35*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 + 21*sin(d*x + c)^ 5/(cos(d*x + c) + 1)^5 - 5*sin(d*x + c)^7/(cos(d*x + c) + 1)^7)/a^4)/d
Time = 0.38 (sec) , antiderivative size = 171, normalized size of antiderivative = 1.16 \[ \int \frac {\cos (c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+a \cos (c+d x))^4} \, dx=-\frac {15 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 15 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 15 \, C \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 21 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 21 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 63 \, C \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 35 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 35 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 105 \, C \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 105 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 105 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 105 \, C \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{840 \, a^{4} d} \]
-1/840*(15*A*tan(1/2*d*x + 1/2*c)^7 - 15*B*tan(1/2*d*x + 1/2*c)^7 + 15*C*t an(1/2*d*x + 1/2*c)^7 + 21*A*tan(1/2*d*x + 1/2*c)^5 + 21*B*tan(1/2*d*x + 1 /2*c)^5 - 63*C*tan(1/2*d*x + 1/2*c)^5 - 35*A*tan(1/2*d*x + 1/2*c)^3 + 35*B *tan(1/2*d*x + 1/2*c)^3 + 105*C*tan(1/2*d*x + 1/2*c)^3 - 105*A*tan(1/2*d*x + 1/2*c) - 105*B*tan(1/2*d*x + 1/2*c) - 105*C*tan(1/2*d*x + 1/2*c))/(a^4* d)
Time = 1.58 (sec) , antiderivative size = 99, normalized size of antiderivative = 0.67 \[ \int \frac {\cos (c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+a \cos (c+d x))^4} \, dx=\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (A+B+C\right )}{8\,a^4\,d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7\,\left (A-B+C\right )}{56\,a^4\,d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\left (A+B-3\,C\right )}{40\,a^4\,d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (B-A+3\,C\right )}{24\,a^4\,d} \]